package com.tao.result;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    Integer code;
    String message;
    Object data;
    public static Result success(Object object){
        return new Result(1,"success",object);
    }

    public static Result success(){
        return new Result(1,"success",null);
    }

    public static Result error(String message){
        return new Result(0,message,null);
    }
}
